Conversation
Update nb for device/dtype Default to cpu
SarahAlidoost
left a comment
There was a problem hiding this comment.
@SCiarella thanks for the fixes! 👍 please see my suggestions and also this issue #87. Sorry if it requires more changes than expected. We can also discuss the issue offline if needed.
Perfect thanks a lot! Sorry to be so difficult about this but I had one more concern in our previous discussion that I feel has not been addressed, namely that ComputeConfig stores a dtype/device as global/class properties which, if I understand correctly, prevents a user from having two instances on different devices. What are your thoughts about making device/dtype tied to model instances? Thanks again for picking this up! |
|
Hi @ronvree, thanks for the suggestion! Yes it makes sense to allow different instances to have different device/dtype. # Create model on GPU 0
ComputeConfig.set_device("cuda:0")
model1 = Model() # captures cuda:0
# Create model on GPU 1
ComputeConfig.set_device("cuda:1")
model2 = Model() # captures cuda:1while retaining all the advantages of having a global container to synchronize the different models and submodels. I have also added |
|
@SCiarella Perfect thanks a lot!! |
SarahAlidoost
left a comment
There was a problem hiding this comment.
@SCiarella thanks! looks very nice 💯 just a small comment, feel free to merge.
Co-authored-by: SarahAlidoost <55081872+SarahAlidoost@users.noreply.github.com>
|



Closes #84